stages:
  - build
  - upload
  - deploy
  
build:
  stage: build
  script:
  - sudo docker build -t devops_img:$CI_COMMIT_SHORT_SHA -f /home/ant/devops_app/app.Dockerfile TPSpring23_django

upload:
  stage: upload
  script:
  - sudo kind load docker-image devops_img:${CI_COMMIT_SHORT_SHA}

deploy:
  stage: deploy
  environment:
    name: production
  script:
    - sudo kubectl apply -f manifests/
    - sudo kubectl get pods
